package com.puzzlebazar.client.services;

import java.util.LinkedList;
import java.util.List;
import java.util.Vector;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.puzzlebazar.client.main.model.PuzzleListInfoImpl.ListType;
import com.puzzlebazar.client.puzzle.model.History;
import com.puzzlebazar.client.puzzle.model.PuzzleModel;
import com.puzzlebazar.client.puzzleinfo.HistoryInfo;
import com.puzzlebazar.client.puzzleinfo.NewPuzzleInfo;
import com.puzzlebazar.client.puzzleinfo.PuzzleAndHistoryInfo;
import com.puzzlebazar.client.puzzleinfo.PuzzleInfo;
import com.puzzlebazar.client.puzzleinfo.PuzzleInfo.Status;


public interface PuzzleServiceAsync {
		  
	public void getHistoryList(String authorEmail, String puzzleInfoKey, AsyncCallback<LinkedList<HistoryInfo>> callback);

	public void getPuzzleList(ListType listType, Vector<String> genreList, AsyncCallback<List<PuzzleInfo>> callback);

	public void createNewPuzzleOrTutorial( NewPuzzleInfo newPuzzleInfo, AsyncCallback< String > callback );

	public void loadPuzzle( String puzzleKey, AsyncCallback< PuzzleInfo > callback );

	public void loadTutorial( String puzzleKey, AsyncCallback< PuzzleAndHistoryInfo > callback );

	public void deletePuzzleOrTutorial( String puzzleKey, AsyncCallback< Boolean > callback );

	public void renamePuzzleOrTutorial( String puzzleKey, String title, AsyncCallback<Boolean> callback);

	public void changePuzzleOrTutorialStatus( String puzzleKey, Status status, AsyncCallback<Boolean> callback);

	public void savePuzzleModel( PuzzleModel model, AsyncCallback< Boolean > callback );

	public void saveHistory( History model, String puzzleInfoKey, boolean completed, AsyncCallback< String > callback );

	public void loadHistory( String historyInfoKey, AsyncCallback< PuzzleAndHistoryInfo > callback  );

	public void saveTutorial(History historyModel, PuzzleModel puzzleModel, AsyncCallback<String> callback );
	
}